NXP Semiconductors /LPC408x_7x /CAN1 /ICR

Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text

Interpret as ICR

31 2827 2423 2019 1615 1211 87 43 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (RESET)RI 0 (RESET)TI1 0 (RESET)EI 0 (RESET)DOI 0 (RESET)WUI 0 (RESET)EPI 0 (RESET)ALI 0 (RESET)BEI 0 (RESET)IDI 0 (RESET)TI2 0 (RESET)TI3 0RESERVED0ERRBIT4_00 (ERROR_OCCURRED_DURIN)ERRDIR 0 (BIT_ERROR)ERRC1_0 0ALCBIT

BEI=RESET, RI=RESET, ALI=RESET, TI2=RESET, EI=RESET, IDI=RESET, WUI=RESET, TI3=RESET, ERRDIR=ERROR_OCCURRED_DURIN, EPI=RESET, ERRC1_0=BIT_ERROR, TI1=RESET, DOI=RESET

Description

Interrupt status, Arbitration Lost Capture, Error Code Capture

Fields

RI

Receive Interrupt. This bit is set whenever the RBS bit in CANxSR and the RIE bit in CANxIER are both 1, indicating that a new message was received and stored in the Receive Buffer. The Receive Interrupt Bit is not cleared upon a read access to the Interrupt Register. Giving the Command Release Receive Buffer will clear RI temporarily. If there is another message available within the Receive Buffer after the release command, RI is set again. Otherwise RI remains cleared.

0 (RESET): Reset

1 (SET): Set

TI1

Transmit Interrupt 1. This bit is set when the TBS1 bit in CANxSR goes from 0 to 1 (whenever a message out of TXB1 was successfully transmitted or aborted), indicating that Transmit buffer 1 is available, and the TIE1 bit in CANxIER is 1.

0 (RESET): Reset

1 (SET): Set

EI

Error Warning Interrupt. This bit is set on every change (set or clear) of either the Error Status or Bus Status bit in CANxSR and the EIE bit bit is set within the Interrupt Enable Register at the time of the change.

0 (RESET): Reset

1 (SET): Set

DOI

Data Overrun Interrupt. This bit is set when the DOS bit in CANxSR goes from 0 to 1 and the DOIE bit in CANxIER is 1.

0 (RESET): Reset

1 (SET): Set

WUI

Wake-Up Interrupt. This bit is set if the CAN controller is sleeping and bus activity is detected and the WUIE bit in CANxIER is 1. A Wake-Up Interrupt is also generated if the CPU tries to set the Sleep bit while the CAN controller is involved in bus activities or a CAN Interrupt is pending. The WUI flag can also get asserted when the according enable bit WUIE is not set. In this case a Wake-Up Interrupt does not get asserted.

0 (RESET): Reset

1 (SET): Set

EPI

Error Passive Interrupt. This bit is set if the EPIE bit in CANxIER is 1, and the CAN controller switches between Error Passive and Error Active mode in either direction. This is the case when the CAN Controller has reached the Error Passive Status (at least one error counter exceeds the CAN protocol defined level of 127) or if the CAN Controller is in Error Passive Status and enters the Error Active Status again.

0 (RESET): Reset

1 (SET): Set

ALI

Arbitration Lost Interrupt. This bit is set if the ALIE bit in CANxIER is 1, and the CAN controller loses arbitration while attempting to transmit. In this case the CAN node becomes a receiver.

0 (RESET): Reset

1 (SET): Set

BEI

Bus Error Interrupt – this bit is set if the BEIE bit in CANxIER is 1, and the CAN controller detects an error on the bus.

0 (RESET): Reset

1 (SET): Set

IDI

ID Ready Interrupt – this bit is set if the IDIE bit in CANxIER is 1, and a CAN Identifier has been received (a message was successfully transmitted or aborted). This bit is set whenever a message was successfully transmitted or aborted and the IDIE bit is set in the IER register.

0 (RESET): Reset

1 (SET): Set

TI2

Transmit Interrupt 2. This bit is set when the TBS2 bit in CANxSR goes from 0 to 1 (whenever a message out of TXB2 was successfully transmitted or aborted), indicating that Transmit buffer 2 is available, and the TIE2 bit in CANxIER is 1.

0 (RESET): Reset

1 (SET): Set

TI3

Transmit Interrupt 3. This bit is set when the TBS3 bit in CANxSR goes from 0 to 1 (whenever a message out of TXB3 was successfully transmitted or aborted), indicating that Transmit buffer 3 is available, and the TIE3 bit in CANxIER is 1.

0 (RESET): Reset

1 (SET): Set

RESERVED

Reserved. The value read from a reserved bit is not defined.

ERRBIT4_0

Error Code Capture: when the CAN controller detects a bus error, the location of the error within the frame is captured in this field. The value reflects an internal state variable, and as a result is not very linear: 00011 = Start of Frame 00010 = ID28 … ID21 00110 = ID20 … ID18 00100 = SRTR Bit 00101 = IDE bit 00111 = ID17 … 13 01111 = ID12 … ID5 01110 = ID4 … ID0 01100 = RTR Bit 01101 = Reserved Bit 1 01001 = Reserved Bit 0 01011 = Data Length Code 01010 = Data Field 01000 = CRC Sequence 11000 = CRC Delimiter 11001 = Acknowledge Slot 11011 = Acknowledge Delimiter 11010 = End of Frame 10010 = Intermission Whenever a bus error occurs, the corresponding bus error interrupt is forced, if enabled. At the same time, the current position of the Bit Stream Processor is captured into the Error Code Capture Register. The content within this register is fixed until the user software has read out its content once. From now on, the capture mechanism is activated again, i.e. reading the CANxICR enables another Bus Error Interrupt.

ERRDIR

When the CAN controller detects a bus error, the direction of the current bit is captured in this bit.

0 (ERROR_OCCURRED_DURIN): Error occurred during transmitting.

1 (ERROR_OCCURRED_DURIN): Error occurred during receiving.

ERRC1_0

When the CAN controller detects a bus error, the type of error is captured in this field:

0 (BIT_ERROR): Bit error

1 (FORM_ERROR): Form error

2 (STUFF_ERROR): Stuff error

3 (OTHER_ERROR): Other error

ALCBIT

Each time arbitration is lost while trying to send on the CAN, the bit number within the frame is captured into this field. After the content of ALCBIT is read, the ALI bit is cleared and a new Arbitration Lost interrupt can occur. 00 = arbitration lost in the first bit (MS) of identifier … 11 = arbitration lost in SRTS bit (RTR bit for standard frame messages) 12 = arbitration lost in IDE bit 13 = arbitration lost in 12th bit of identifier (extended frame only) … 30 = arbitration lost in last bit of identifier (extended frame only) 31 = arbitration lost in RTR bit (extended frame only) On arbitration lost, the corresponding arbitration lost interrupt is forced, if enabled. At that time, the current bit position of the Bit Stream Processor is captured into the Arbitration Lost Capture Register. The content within this register is fixed until the user application has read out its contents once. From now on, the capture mechanism is activated again.

Links

()